package reflect;

import reflect.annotations.AutoRunMethod;

public class Student {
    private  String name ="张三";
    private  int age =18;
    private  char gender ='男';
    public Student(){}

    public Student(String name, int age, char gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    public String getName() {
        return name;
    }
    @AutoRunMethod
    public  void study(){System.out.println("学生"+name+"我爱学习");}
    public  void playGame(){System.out.println("学生"+name+"我爱游戏");}

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public char getGender() {
        return gender;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender=" + gender +
                '}';
    }

    public void setGender(char gender) {
        this.gender = gender;
    }
}
